<script language="javascript" type="text/javascript" src="p_categoria_noticia/valida_form.js"></script>
<?php 

$id = $_GET['i'];
$resul = mysql_query("SELECT * FROM `categoria_noticia` WHERE `categoria_noticia`.`id_categoria_noticia` = $id");
$categoria_noticia = mysql_fetch_array($resul);

?>

<div class="form">
	<div class="row">
		<div class="col-md-12">
			<div class="page-header">
				<h2>Editar Categoria de Not&iacutecia</h2>
			</div>
		</div>
	</div>
	<div class="row">
	<div class="col-md-3">
			<?php include "../admin/p_categoria_noticia/actions-categoria-noticia.php"; ?>			
		</div><!-- end col md 3 -->
		<div class="col-md-9">
		<!-- HEAD DE FORMULÃ�RIO -->
		<div class="panel panel-default">
			<div class="panel-heading"><h5>Formul&aacuterio para editar registro</h5></div>
			<div class="panel-body">
			<!-- FORMULÃ�RIO -->
			<form  method="post" name="form1" action="../admin/p_categoria_noticia/editar.php">
				<div class="row">
					<div class="col-md-12 form-group"><h6>(<span class="text-danger">*</span>) Campos de preenchimento obrigat&oacuterio.</h6></div>
				</div>
				<input type="hidden" name="id_categoria_noticia" value="<?php echo $categoria_noticia['id_categoria_noticia'];?>">
				<div class="row">
					<div class="form-group col-md-12">
						<label for="descricao">Nome da Categoria:  (<span class="text-danger">*</span>)</label>
   	   					<input type="text" class="form-control " name="descricao" id="descricao" value="<?php echo $categoria_noticia['descricao_categoria_noticia'];?>"> 
					</div>
				</div>
				<div class="row">	
					<div class="form-group col-md-6">
						<label for="status">Situa&ccedil&atildeo</label>
    					<select name="status" id="status" class="form-control">
		          			<option value="selecione">Selecione...</option>
		          			<?php if($categoria_noticia['status'] == 1){ ?>
								<option value="<?php echo $categoria_noticia['status']; ?>" selected>Categoria Ativa</option>
								<option value="0">Categoria Inativa</option>
							<?php } else{?>
								<option value="<?php echo $categoria_noticia['status']; ?>" selected>Categoria Inativa</option>
								<option value="1">Categoria Ativa</option>
							<?php }?>
		          		</select>
		          	</div>
				</div>
				
				<div class="row">
					<div class="form-group col-md-2">
						<input type="submit" value="Salvar" class="btn btn-default " name="enviar" onclick="return valida()" >
					</div>
				</div>
			</form>
			</div>
		</div>

		</div><!-- end col md 12 -->
	</div><!-- end row -->
</div>
			